from pythonds.basic.stack import Stack


def tenTotwo(decNumber):
    remstatck = Stack()
    while decNumber > 0:
        rem = decNumber % 2  # 取余得出转化后的值
        remstatck.push(rem)
        decNumber = decNumber // 2  # 整除得出下一次需要除的数
    binString = ''
    while not remstatck.isEmpty():
        binString += str(remstatck.pop())
    return binString


print(tenTotwo(35))
